<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>轮播图</title>
    <script src="./iconfont/iconfont.js"></script>
    <style>
        /* 基础公共样式：清除默认样式 + 设置通用样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        li {
            list-style: none;
        }

        a {
            color: #333;
            text-decoration: none;
        }

        .banner {
            width: 564px;
            height: 315px;
            background-color: pink;
            margin: 100px auto;
            overflow: hidden;
            position: relative;
        }

        div ul {
            display: flex;
        }

        .banner img {
            width: 564px;
            vertical-align: top;
        }

        .banner .prev,
        .banner .next {
            display: none;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 30px;
            line-height: 30px;
            background-color: rgba(0, 0, 0, 0.3);
        }

        .banner:hover .prev,
        .banner:hover .next {
            display: block;
        }

        .banner .prev {
            left: 0;
            border-radius: 0 15px 15px 0;
        }

        .banner .next {
            right: 0;
            border-radius: 15px 0 0 15px;
            text-align: center;
        }

        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
        }

        /* 圆点样式 */
        .banner ol {
            height: 13px;
            display: flex;
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 10px;
            background-color: rgba(255, 255, 255, 0.3);
        }

        .banner ol li {
            margin: 3px;
            border-radius: 50%;
            width: 8px;
            height: 8px;
            background-color: #fff;
            cursor: pointer;
        }

        .banner ol .active {
            background-color: red;
        }
    </style>
</head>

<body>

    <div class="banner">
        <!-- 图片 -->
        <ul>
            <li>
                <img src="./img/banner1.jpg" alt="">
            </li>
            <li>
                <img src="./img/banner2.jpg" alt="">
            </li>
            <li>
                <img src="./img/banner3.jpg" alt="">
            </li>
        </ul>

        <!-- 箭头 -->
        <div class="prev">
            <a href="">
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-zuoce"></use>
                </svg>
            </a>

        </div>
        <div class="next">
            <a href="">
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-youce"></use>
                </svg>
            </a>

        </div>

        <!-- 圆点 -->
        <ol>
            <li class="active"></li>
            <li></li>
            <li></li>
        </ol>
    </div>
</body>

</html>